<?php
/**
 * Config_Interface
 * @filesource
 */
/**
 * Namespace
 */
namespace framework\library\interfaces;
/**
 * Dependencies
 */
/**
 * Loads standard config from DB and stores for use
 * 
 * @author Randy Casburn <randy@plurious.com>
 * @copyright Copyright Plurious Software, all rights reserved
 * @license MIT
 * @license http://www.opensource.org/licenses/mit-license.html
 * @link http://plurious.com/framework/documentation/classes/Front.html
 * @version 2.1
 * @api
 */
interface Config_Interface {

    /**
     * Return a value that corresponds to the given key
     * 
     * @param string $key the value corresponding to this key will be returned
     * @return mixed value corresponding the provided key
     */
    public function get($key);

    /**
     * Store the key/value pair in the registry
     * 
     * @param string $key
     * @param mixed $value 
     */
    public function set($key, $value);

    /**
     * Check for a value in the registry that corresponds to the given key
     * 
     * @param string $key to search for
     * @return boolean True if value exists for the given key
     */
    public function has($key);

    /**
     * Loads configuration information from a properly constructed config file.
     * 
     * File must contain only variable assigments that assign key/value pairs 
     * to elements of an array named $cfg like so:
     * 
     * $cfg['key'] = 'value';
     * 
     * @param string $filename 
     */
    public function load($filename);

    /**
     * Loads configuration data from the database for a given Application or 
     * context.
     * 
     * @param int $app_id Indicates the context to load configuration data for
     */
    public function loadAppConfig($app_id);
}

?>